<?php
require ('Scrapper.php');

$scrape = new Scrapper("http://www.cachorroperdido.com.br/");
$scrape->page('lista_doacao.aspx');

$table = $scrape->scrap('/<tr class="tituloTabela"(.|\s)+?<\/span>/', Scrapper::$MATCH_SINGLE, true);
$links = $scrape->extract($table, 'links');

$emails = array();
foreach ($links as $link => $date) {
	foreach ($scrape->extract($scrape->page($link), 'emails') as $email => $occurrences) {
		$emails[] = $email;
	}
}

?>
